package com.alkaid.anime.mapper;

import com.alkaid.commons.entity.AnimeRefresh;
import com.alkaid.commons.entity.AnimeSource;
import com.alkaid.commons.entity.AnimeVideo;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;

/**
 * @author Kylin
 */
@Mapper
public interface AnimeVideoMapper {
    /**
     * 查询8个最近更新的番剧
     *
     * @param num the num
     * @return 番剧列表 list
     */
    List<AnimeVideo> findAnimeVideos(int num);

    /**
     * 查询某一天的新番时间表
     *
     * @param date the now
     * @return the list
     */
    List<AnimeRefresh> findAnimeRefresh(Date date);

    /**
     * 查询与id拥有相同Anime_id的视频
     *
     * @param id the id
     * @return the list
     */
    List<AnimeVideo> findSameAnimeIdById (Integer id);

    /**
     * 查询相同Anime_id的视频
     *
     * @param animeId the anime id
     * @return the list
     */
    List<AnimeVideo> findByAnimeId (Integer animeId);

    /**
     * 通过id查询视频
     *
     * @param id the id
     * @return the AnimeVideo
     */
    AnimeVideo findById (Long id);

    /**
     * Find source list.
     *
     * @param animeVideoId the anime video id
     * @return the list
     */
    List<AnimeSource> findSource(Long animeVideoId);
}
